#ifndef __DBNC_H
#define __DBNC_H
#define DBNC_FLT_THR_ON 10
#define DBNC_FLT_THR_OFF 10
#undef poll

class dbnc_flt {
public:
    dbnc_flt() {
        thr_on = DBNC_FLT_THR_ON;
        tim_on = 0;
        thr_off = DBNC_FLT_THR_OFF;
        tim_off = 0;
        flg = false;
    }

    bool poll(unsigned int tick, bool in);

    bool get() const {
        return flg;
    }

private:
    unsigned int thr_on;
    unsigned int tim_on;
    unsigned int thr_off;
    unsigned int tim_off;
    bool flg;
};

#endif